/*
 *	Copyright © 2013 Changsha Shishuo Network Technology Co., Ltd. All rights reserved.
 *	长沙市师说网络科技有限公司 版权所有
 *	http://www.shishuo.com
 */

package com.hlingsoft.cms.dao;

import com.hlingsoft.cms.entity.OrderInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface OrderInfoDao {



	/**
	 * 添加商品
	 * 
	 * @return Integer
	 */
	public long addOrderInfo(OrderInfo orderInfo);


	/**
	 * 获取用户的订单
	 * @param appUserId
	 * @return
	 */
	public List<OrderInfo> getOrderInfoByAppUserId(@Param("appUserId") long appUserId);


	/**
	 * 获取所有的订单
	 * @return
	 */
	public List<OrderInfo> getOrderList();


	public List<OrderInfo> getOrderListFY(@Param("offset")int offset,@Param("rows")int rows);


	/**
	 * 订单数
	 * @return
	 */
	public int getOrderListCount();


	/**
	 * 根据id获取订单
	 * @param id
	 * @return
	 */
	public  OrderInfo getOrderById(@Param("id") long id);


	/**
	 * 修改订单状态
	 * @param orderInfo
	 * @return
	 */
	public int updateOrderInfo(OrderInfo orderInfo);

	/**
	 * 查询过期的订单
	 * @return
	 */
	public List<OrderInfo> getWaitPayOrderList();



	public OrderInfo getOrderByOrderId(@Param("orderId") String orderId);


	public List<OrderInfo> getOrderListByAppUserIdWithNone(@Param("appUserId") long appUserId);
}
